package decorator.main.common;

import decorator.main.abs.AbstractBread;
import decorator.main.abs.IBread;

public class SweetDecorator extends AbstractBread {

    //构造方法
    public SweetDecorator(IBread bread) {
        super(bread);
    }

    //黑心商贩开始染色
    public void paint() {
        System.out.println("添加甜蜜素的着色剂...");
    }

    //重载父类的和面方法
    @Override
    public void kneadFlour() {
        //再面粉中加入染色剂开始和面
        this.paint();
        super.kneadFlour();
    }
}
